<template>
  <plain-page>
    <el-card shadow="never" style="min-height: 400px">
      <el-tabs v-model="activeType" tab-position="left" @tab-click="onTabClick">
        <el-tab-pane name="basic" label="基本设置">
          <profile />
        </el-tab-pane>
        <el-tab-pane name="security" label="安全设置">
          <security />
        </el-tab-pane>
        <el-tab-pane v-if="false" name="stat" label="统计分析">
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </plain-page>
</template>

<script>
import Profile from './Profile';
import Security from './Security';

export default {
  pageProps: {
    title: '账号设置'
  },
  components: {
    Profile,
    Security
  },
  data() {
    return {
      activeType: 'basic'
    };
  },
  methods: {
    onTabClick(tab) {
      if (tab.name == 'stat') {
        //this.$http.get('/api/sys/login_event/login_count', {params: {adminId: app.admin.id}});
      }
    }
  }
}
</script>

<style scoped>
.el-card {
  margin: 0 auto;
  min-width: 800px;
  max-width: 900px;
  height: calc(100% - 2px);
}

.el-tabs >>> .el-tab-pane {
  padding-left: 20px;
}
</style>